<?php

use Doctrine\Common\Collections\ArrayCollection;

/** * @Entity @Table(name="TDisciplina") */
class Disciplina 
{
   /** @Id @Column(length=10, name="Disciplina_codDisc") */
   protected $_codDisc;
   /** @Column(length=32, name="Disciplina_Nome") */
   private $_nome;
   /** @Column(length=5, name="Disciplina_chSemanal") */
   private $_chSemanal;
   /** @Column(length=5, name="Disciplina_teorica") */
   private $_teorica;
   /** @Column(length=5, name="Disciplina_pratica") */
   private $_pratica;
   /** @Column(length=5, name="Disciplina_duracaoSemestral") */
   private $_duracaSemestral;
   /** @Column(length=40, name="Disciplina_chSemestral") */
   private $_chSemestral;
   /** @Column(length=500, name="Disciplina_ementa") */
   private $_ementa;
   /** @Column(length=500, name="Disciplina_cProgramatico") */
   private $_cProgramatico;
   /** * @OneToMany(targetEntity="Bibliografia", mappedBy="_disciplina") *
   @var Bibliografia[] */
   private $_bibliografia = null;
   /** @Column(length=32, name="Disciplina_departamento") */
   private $_departamento;
   /** @Column(length=32, name="Disciplina_instituto") */
   private $_instituto; 

   public function __construct($codDisc = '', $nome = '', $chSemestral = '', $teorica = '', $pratica = '', 
      $duracaoSemestral = '', $chSemestral = '', $ementa = '', $cProgramatico = '', $bibliografia = '', $departmento = '', $instituto = '', 
      $bibliografia)  
   {
      	   
   $this->_codDisc  = $codDisc;
   $this->_nome = $nome;
   $this->_chSemanal = $chSemanal;
   $this->_teorica = $teorica;
   $this->_pratica = $pratica;
   $this->_duracaSemestral = $duracaoSemestral;
   $this->_chSemestral = $chSemestral;
   $this->_ementa = $ementa;
   $this->_cProgramatico =$cProgramatico;
   $this->_bibliografia = new ArrayCollection();
   $this->_departamento = $departmento;
   $this->_instituto = $instituto;
   

   }
   
   // set methods 
   public function setcodDisc($newValue) {  $this->_codDisc = $newValue; }
   public function setNome($newValue) {  $this->_nome = $newValue; }
   public function setCHSemanal($newValue) { $this->_chSemanal = $newValue; }
   public function setTeorica($newValue) { $this->_teorica = $newValue; }
   public function setPratica($newValue) { $this->_pratica = $newValue; }
   public function setDuracaoSemestral($newValue) { $this->_duracaSemestral = $newValue; }
   public function setCHSemestral($newValue) { $this->_chSemestral = $newValue; }
   public function setEmenta($newValue) { $this->_ementa = $newValue; }
   public function setCProgramatico($newValue) { $this->_cProgramatico = $newValue; }
   public function setDepartamento($newValue) { $this->_departamento = $newValue; }
   public function setInstituto($newValue) { $this->_instituto = $newValue; }
   
   // get methods   
   public function getcodDisc($newValue) {  return $this->_codDisc; }
   public function getNome($newValue) {  return $this->_nome; }
   public function getCHSemanal($newValue) { return $this->_chSemana; }
   public function getTeorica($newValue) { return $this->_teorica; }
   public function getPratica($newValue) { return $this->_pratica; }
   public function getDuracaoSemestral($newValue) { return $this->_duracaSemestral; }
   public function getCHSemestral($newValue) { return $this->_chSemestral; }
   public function getEmenta($newValue) { return $this->_ementa; }
   public function getCProgramatico($newValue) { return $this->_cProgramatico; }
   public function getDepartamento($newValue) { return $this->_departamento; }
   public function getInstituto($newValue) { return $this->_instituto; }

   public function addBibliografia($bibliografia)
   {
      $this->_bibliografia[] = $bibliografia;
   }
   
   // to string method
   public function toString() 
   { 
      // a definir
   }
     
}

?>
